package com.tools.service.impl;

import com.tools.model.entity.InfoEntity;
import com.tools.model.entity.UserEntity;
import com.tools.repository.InfoRepository;
import com.tools.service.UserInfoService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
@RequiredArgsConstructor
public class UserInfoServiceImpl implements UserInfoService {
    private final InfoRepository infoRepository;

    @Override
    public InfoEntity queryInfo(UserEntity doctor) {
        return infoRepository.findAllByUserId(doctor.getUserId());
    }
}
